<template>
  <div class="dashboard-editor-container" style="padding: 0">
    <!--    <el-row>-->
    <!--      <el-col :span="8">-->
    <!--        <div class="demo-image">-->
    <!--          一、下载空气APP-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          1.打开浏览器-->
    <!--        </div>-->
    <!--        <br>-->
    <div style="width:100%;height: calc(100vh - 84px);" class="demo-image">
      <img :src="browserUrl" style="width:100%;height:100%;background-size:100% 100%;background-repeat: no-repeat">
    </div>
    <!--      </el-col>-->
    <!--      <el-col :span="8">-->
    <!--        <br><br>-->
    <!--        <div class="demo-image">-->
    <!--          2.扫描二维码(Android)-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          <img :src="airAppUrl" width="60%">-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--       <el-col :span="8">-->
    <!--        <br><br>-->
    <!--        <div class="demo-image">-->
    <!--          2.扫描二维码(IOS)-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          <img :src="airAppUrlIos" width="60%">-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--    </el-row>-->
    <!-- <br>
    <el-row>
      <el-col :span="8">
        <div class="demo-image">
          二、下载smart APP
        </div>
        <br>
        <div class="demo-image">
          1.打开浏览器
        </div>
        <br>
        <div class="demo-image">
          <img :src="browserUrl" width="60%">
        </div>
      </el-col>
      <el-col :span="8">
        <br><br>
        <div class="demo-image">
          2.扫描二维码
        </div>
        <br>
        <div class="demo-image">
          <img :src="smartAppUrl" width="60%">
        </div>
      </el-col>
    </el-row> -->
    <!--    <br>-->
    <!--    <el-row>-->
    <!--      <el-col :span="8">-->
    <!--        <div class="demo-image">-->
    <!--          三、下载维护APP-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          1.打开浏览器-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          <img :src="browserUrl" width="60%">-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--      <el-col :span="8">-->
    <!--        <br><br>-->
    <!--        <div class="demo-image">-->
    <!--          2.扫描二维码-->
    <!--        </div>-->
    <!--        <br>-->
    <!--        <div class="demo-image">-->
    <!--          <img :src="maintainAppUrl" width="60%">-->
    <!--        </div>-->
    <!--      </el-col>-->
    <!--    </el-row>-->
    <!--    <br>-->
    <!-- <el-row>
      <el-col :span="8">
        <div class="demo-image">
          四、下载空气监控APP
        </div>
        <br>
        <div class="demo-image">
          1.打开浏览器
        </div>
        <br>
        <div class="demo-image">
          <img :src="browserUrl" width="60%">
        </div>
      </el-col>
      <el-col :span="8">
        <br><br>
        <div class="demo-image">
          2.扫描二维码
        </div>
        <br>
        <div class="demo-image">
          <img :src="airKeepAppUrl" width="60%">
        </div>
      </el-col>
    </el-row> -->
  </div>
</template>

<script>
  import request from '@/utils/request'

  export default {
    name: 'Index',
    data() {
      return {
        dataList: null,
        browserUrl: this.$store.state.user.bigScreenUrl + 'appDownload/framework.png',
        airAppUrl: this.$store.state.user.bigScreenUrl + 'appDownload/airAppUrl.png',
        airAppUrlIos: this.$store.state.user.bigScreenUrl + 'appDownload/airAppUrlIos.png',
        smartAppUrl: this.$store.state.user.bigScreenUrl + 'appDownload/smartAppUrl.png',
        maintainAppUrl: this.$store.state.user.bigScreenUrl + 'appDownload/maintainAppUrl.png',
        airKeepAppUrl: this.$store.state.user.bigScreenUrl + 'appDownload/airKeepAppUrl.png'
      }
    },
    created() {
      this.handleFilter()
    },
    methods: {
      handleFilter: function() {
        listAir()
          .then(response => {
            this.airAppUrl = response.data.data.airAppUrl
            this.airAppUrlIos = response.data.data.airAppUrlIos
            this.smartAppUrl = response.data.data.smartAppUrl
            this.maintainAppUrl = response.data.data.maintainAppUrl
            this.airKeepAppUrl = response.data.data.airKeepAppUrl
          })
          .catch(() => {
            this.dataList = []
          })
      }
    }
  }
  export function listAir() {
    return request({
      url: '/data/area/getAppUrl',
      method: 'get'
    })
  }
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
  .dashboard-editor-container {
    padding: 32px;
    background-color: rgb(240, 242, 245);
    .chart-wrapper {
      background: #fff;
      padding: 16px 16px 0;
      margin-bottom: 32px;
    }
  }
</style>
